Skip to content

refactor(aggregation): Add project_weights dictionary#675

Closed
PierreQuinton wants to merge 2 commits into
mainfrom
add-qp-solver-selector
Closed

refactor(aggregation): Add project_weights dictionary#675
PierreQuinton wants to merge 2 commits into
mainfrom
add-qp-solver-selector

Conversation

@PierreQuinton
Copy link
Copy Markdown
Contributor

Going in the direction of having several possible solvers. The idea is to be able to map a solver to a method that solves the dual cone projection for some U and G.

@ValerianRey ValerianRey added package: aggregation cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements labels May 9, 2026
@github-actions github-actions Bot changed the title Add project_weights dictionary refactor(aggregation): Add project_weights dictionary May 9, 2026
@PierreQuinton
Copy link
Copy Markdown
Contributor Author

Several things comes to mind:

  • Some qp solvers are parametrized, a string is therefore not enough to define it.
  • Some qp solvers (proxsuite) already do regularization with a decay of the reg_eps, so this parameter could be a parameter of the solver itself
  • some users may want to implement their own solver (which might be very imprecise with max_iter=1 for instance) and we cannot provide an exhaustive list of all ideas that could happen
  • we may want the default solver to depend on what solvers are installed.

For this reason, I think we should define a (possibly private) class DualConeProjector(ABC, Callable[[Tensor, PSDMatrix], Tensor]) which would project weights. Then we can inherit from it to implement a specific solver. I think we can then provide a collection of solvers (or constructors of solver when they are parametrized).

@ValerianRey
Copy link
Copy Markdown
Contributor

For this reason, I think we should define a (possibly private) class DualConeProjector(ABC, Callable[[Tensor, PSDMatrix], Tensor]) which would project weights. Then we can inherit from it to implement a specific solver. I think we can then provide a collection of solvers (or constructors of solver when they are parametrized).

That would be very clean!

The other possibility would be to provide the necessary arguments as **kwargs so that they can be transmitted to the solver. Much more friendly to the beginner user, but less so to the experienced user probably.

I really don't know which one we should go for.

@PierreQuinton
Copy link
Copy Markdown
Contributor Author

Closing in favor of #678

@PierreQuinton PierreQuinton deleted the add-qp-solver-selector branch May 11, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements package: aggregation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants